import Link from "next/link"
import Router from "next/router"
import { useState } from "react"

function Linker() {
    const [id, setId] = useState(1)

    return (
        <>
            <Link href={`/test/27/72`}>test</Link>
            <button onClick={()=> {Router.push(`/test/${id}`)}}>to test1</button>
            <button onClick={()=> {Router.push('/test?id=2')}}>to test2</button>
        </>
    )
}

export default Linker